Skip to content

opentelemetry-exporter-http-transport: default to urllib3 transport only when requests-specific env vars are absent - #5711

Closed
herin049 wants to merge 2 commits into
open-telemetry:mainfrom
herin049:fix/urllib3-proxies
Closed

herin049 wants to merge 2 commits into
open-telemetry:mainfrom
herin049:fix/urllib3-proxies

Conversation

@herin049

Copy link
Copy Markdown
Contributor

Description

Default to the urllib3 transport for HTTP exporters only when requests-specific environment variables are absent.

Fixes #5710

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tox

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…nly when requests-specific env vars are absent
@herin049
herin049 requested a review from a team as a code owner September 29, 2026 15:18
@herin049
herin049 requested a balanced review from Copilot September 29, 2026 15:18
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Closed · refreshed 2026-09-30 16:20 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

CA-bundle environment variables are incorrectly matched case-insensitively on POSIX.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes #5710 by selecting the requests transport when proxy or CA-bundle environment configuration requires it.

Changes:

  • Adds environment-aware default transport selection.
  • Applies selection to protobuf and JSON OTLP exporters.
  • Adds tests, documentation, and changelog coverage.
File Description
.changelog/​5711.fixed Records the transport-selection fix.
exporter/​opentelemetry-exporter-http-transport/​README.rst Documents proxy and CA-bundle behavior.
exporter/​opentelemetry-exporter-http-transport/​src/​opentelemetry/​exporter/​http/​transport/​__init__.py Implements environment-aware selection.
exporter/​opentelemetry-exporter-http-transport/​tests/​test_load_transport.py Tests selection and fallback behavior.
exporter/​opentelemetry-exporter-otlp-json-http/​src/​opentelemetry/​exporter/​otlp/​json/​http/​_internal.py Uses dynamic default selection.
exporter/​opentelemetry-exporter-otlp-json-http/​tests/​test_internal.py Tests JSON exporter integration.
exporter/​opentelemetry-exporter-otlp-proto-http/​src/​opentelemetry/​exporter/​otlp/​proto/​http/​_common/​__init__.py Uses dynamic selection without an explicit session.
exporter/​opentelemetry-exporter-otlp-proto-http/​tests/​test_common.py Tests protobuf exporter integration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@herin049 herin049 moved this to Reviewed PRs that need fixes in Python PR digest Sep 29, 2026

@xrmx xrmx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @emdneto that maybe is better to revert to requests as default and list urllib3 limitation instead. Once we close the gaps we can switch again.

@herin049 herin049 closed this Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

opentelemetry-exporter-otlp-proto-http: 1.45.0 ignores HTTPS_PROXY (default urllib3 transport)

3 participants